import request from '@/utils/request'
//新建书集
export function createBook(data) {
    return request({
        url: '/works/createBook',
        method: 'post',
        data
    })
}
//作品分类 /works/selectCategory2
export function workClass() {
    return request({
        url: '/works/selectCategory2',
        method: 'get',
    })
}
//作品标签 /works/selectHotTags
export function getTages() {
    return request({
        url: '/works/selectHotTags',
        method: 'get',
    })
}
//查询作品列表/works/bookList
export function bookList() {
    return request({
        url: '/works/bookList',
        method: 'get',
    })
}
//作品详情/works/getBookInfo
export function getBookInfo(data) {
    return request({
        url: '/works/getBookInfo',
        method: 'post',
        data
    })
}
//修改作品信息 /works/updateBookInfo
export function updateBookInfo(data) {
    return request({
        url: '/works/updateBookInfo',
        method: 'post',
        data
    })
}
//添加新章节草稿内容/bookChapter/addChapterDraft
export function addChapterDraft(data) {
    return request({
        url: '/bookChapter/addChapterDraft',
        method: 'post',
        data
    })
}
//查询书记草稿列表 /bookChapter/selectDraftChapterList
export function selectDraftChapterList(data) {
    return request({
        url: '/bookChapter/selectDraftChapterList',
        method: 'post',
        data
    })
}
//获取章节草稿详情 /bookChapter/selectChapterDraft
export function selectChapterDraft(data) {
    return request({
        url: '/bookChapter/selectChapterDraft',
        method: 'post',
        data
    })
}
// 发布章节审核内容 /bookChapter/addChapterCheck
export function addChapterCheck(data) {
    return request({
        url: '/bookChapter/addChapterCheck',
        method: 'post',
        data
    })
}
//修改草稿章节保存草稿箱/bookChapter/updateChapterDraft
export function updateChapterDraft(data) {
    return request({
        url: '/bookChapter/updateChapterDraft',
        method: 'put',
        data
    })
}
//查询章节审核列表/bookChapter/selectChapterCheckList
export function selectChapterCheckList(data) {
    return request({
        url: '/bookChapter/selectChapterCheckList',
        method: 'post',
        data
    })
}
//获取章节审核详情 /bookChapter/selectChapterCheck
export function selectChapterCheck(data) {
    return request({
        url: '/bookChapter/selectChapterCheck',
        method: 'post',
        data
    })
}
//获取最新已发布章节 /bookChapter/selectLatestChapter
export function selectLatestChapter(data) {
    return request({
        url: '/bookChapter/selectLatestChapter',
        method: 'post',
        data
    })
}
//查询作品列表-选择作品/worksData/selectBookList
export function selectBookList() {
    return request({
        url: '/worksData/selectBookList',
        method: 'get',
    })
}
//查询作品的收藏量与订阅量/worksData/getCollectNumAndSubNum
export function getCollectNumAndSubNum(data) {
    return request({
        url: '/worksData/getCollectNumAndSubNum',
        method: 'post',
        data
    })
}
//查询书籍章节订阅列表/worksData/selectChapterSubList
export function selectChapterSubList(data) {
    return request({
        url: '/worksData/selectChapterSubList',
        method: 'post',
        data
    })
}
///works/selectCategory2/{site}
export function selectCategory2(data) {
    return request({
        url: '/works/selectCategory2/' + data.site,
        method: 'get',
    })
}
// 删除章节草稿内容
export function deleteChapterDraft(data) {
    return request({
        url: '/bookChapter/deleteChapterDraft',
        method: 'delete',
        data
    })
}
//  敏感词库
export function dangerousWord(data) {
    return request({
        url: '/bookChapter/dangerousWord ',
        method: 'post',
        data
    })
}